using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Buka.BLL.Model;
using Buka.BLL.Provider;

public partial class controls_CreateUser : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        User user = new User();
        user.BirthDate = DateTime.Now;
        user.City = "Zenica";
        user.CreatedDate = DateTime.Now;
        user.Email = tbEmail.Text;
        user.EndDate = DateTime.Now;
        user.FirstName = tbName.Text;
        user.IsActive = true;
        user.IsOnline = false;
        user.LastName = tbLastName.Text;
        user.Password = tbPassword.Text;
        user.UserName = tbUsername.Text;
        user.UserRightsID = 1;
        user.UserTypeId = 1;
        user.Sex = "male";
        user.Ranking = 0;
        user.StatusId = 1;
        long userId = new UserProvider().CreateUser(user);
    }
}
